package io.hxci.modules.tea.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hxci.common.utils.PageUtils;
import io.hxci.common.utils.R;
import io.hxci.modules.sys.entity.SysDictEntity;
import io.hxci.modules.tea.domain.TeaDict;
import io.hxci.modules.tea.domain.TeaTreatise;
import io.hxci.modules.tea.service.TeaDictService;
import io.hxci.modules.tea.service.TeaTreatiseService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("tea/dict")
public class TeaDictController {
    @Autowired
    private TeaDictService teaDictService;

    @RequestMapping("/list/{type}")
    public List<TeaDict> positList(@PathVariable("type") String type){
        List<TeaDict> list = teaDictService.list(new QueryWrapper<TeaDict>().like(StringUtils.isNotBlank(type),"type", type));
        return list;
    }
}
